public class MenuItem {
		
		private String name;
		private String link;
		private MultistrokeMarkingMenu subMenu;
		private int menuIndexNumber;
		private double x, y;
		private MultistrokeMarkingMenu parentMSMM;
		
		
		public MenuItem(String name, MultistrokeMarkingMenu parentMSMM) {
			this.name = name;
			this.parentMSMM = parentMSMM;
			this.x = 0;
			this.y = 0;
			this.link = "";
					
		}
		
		public String getName() {
			return name;
		}
		public boolean setSubMenu(MultistrokeMarkingMenu subMenu) {
			this.subMenu = subMenu;
			return true;
		}
		
		public MultistrokeMarkingMenu getSubMenu() {
			return this.subMenu;
		}
		
		public boolean setLink(String link) {
			this.link = link;			
			return true;
		}
		
		public String getLink() {
			return this.link;
		}
		
		public boolean setCoordinate(double[] coordinate) {
			this.x = coordinate[0];
			this.y = coordinate[1];
			return true;
		}
		
		public double[] getCoordinates() {
			double[] coor = new double[2];
			coor[0] = x;
			coor[1] = y;
			return coor;
		}
		
		public boolean setMenuIndexNumber(int index) {
			this.menuIndexNumber = index;
			return true;
		}
		
		public int getMenuIndexNumber() {
			return menuIndexNumber;
		}
					
		public String toString() {
			
			String staticIndent = "\t";	
			
			String dynamicIndent = "";			
			for (int i = 0; i < parentMSMM.getDepth(); i++) {
				dynamicIndent += staticIndent;// + staticIndent;
			}
					return dynamicIndent + "<MSMM>\n" 
							+ dynamicIndent + staticIndent + "<Title>" + name + "</Title>\n"	
							+ dynamicIndent + staticIndent + "<coordinates>\n" 
							+ dynamicIndent + staticIndent + staticIndent + "<x>" + x + "</x>\n"
							+ dynamicIndent + staticIndent + staticIndent + "<y>" + y + "</y>\n"
							+ dynamicIndent + staticIndent + "</coordinates>\n"
							+ dynamicIndent + staticIndent + "<menuIndexNumber>" + menuIndexNumber + "</menuIndexNumber>\n"
							+ dynamicIndent + staticIndent + "<depth>" + parentMSMM.getDepth() + "</depth>\n"
							+ dynamicIndent + staticIndent + "<link>" + link + "</link>\n"
																+ subMenu
							+ dynamicIndent + "</MSMM>\n";					
					
		}
		
	
	}